NOTE: These are code samples provided for a conceptual understanding. Please do not copy / paste directly. # Request / Response
Create Subscription
HttpResponse<String> response = Unirest.post("https://apx.cisco.com/ccw/api/v1.0/subscription")
.header("content-type", "application/json")
.header("cache-control", "no-cache")
.body("{\n \"uuid\": \"test_order123123123123\",\n \"createdBy\": \"user_id\",\n \"createdDateTime\": \"2017-02-17T01:25:43.000+0000\",\n \"csbSubscriptionId\": \"csbSubtest123\",\n \"csbOrderId\": \"csbSubOrderTest123\",\n \"purchaseOrderNumber\": \"PO12345678\",\n \"billingAddressId\": 403766138,\n \"currency\": \"USD\",\n \"paymentMethod\": \"NET30\",\n \"rejectDuplicatePO\": \"Y\",\n \"governmentOrder\": \"N\",\n \"intialTerm\": 12,\n \"autoRenewalTerm\": 12,\n \"billingModel\": \"Monthly Billing\",\n \"requestedStartDate\": \"2017-03-01\",\n \"parties\": [\n {\n \"partyType\": \"End Customer\",\n \"partyName\": \"Customer_Name\",\n \"addressLine1\": \"Customer_Address\",\n \"city\": \"Customer_Address_City\",\n \"state\": \"Customer_Address_State\",\n \"postalCode\": \"94043\",\n \"country\": \"US\",\n \"businessContactName\": \"First Last\",\n \"businessContactEmail\": \"firstlast@customeremail.com\",\n \"businessContactTelephone\": \"444-555-6666\"\n },\n {\n \"partyType\": \"Reseller\",\n \"partyName\": \"Reseller_Name\",\n \"addressLine1\": \"Reseller_Address\",\n \"accountNumber\": \"21472846\",\n \"city\": \"Reseller_Address_city\",\n \"state\": \"Reseller_Address_State\",\n \"postalCode\": \"70507\",\n \"country\": \"US\",\n \"businessContactName\": \"First Last\",\n \"businessContactEmail\": \"firstlast@reselleremail.com\",\n \"businessContactTelephone\": \"111-222-3344\"\n }\n ],\n \"offers\": [\n {\n \"lineNumber\": 1,\n \"offerSKU\": \"A-SPK-NU-M3\",\n \"offerATO\": \"A-SPK-NAMED-USER\",\n \"quantity\": 1,\n \"csbCiscoKey\": \"2163146462363366067\",\n \"provisioningAttributes\": [\n {\n \"attributeIdentifier\": \"9331\",\n \"attributeName\": \"Common.Contacts.END CUSTOMER EMAIL\",\n \"attributeValue\": \"endcust@customeremail.com\"\n },\n {\n \"attributeIdentifier\": \"8754\",\n \"attributeName\": \"Common.Contacts.PARTNER ADMIN EMAIL\",\n \"attributeValue\": \"partner@partneremail.com\"\n },\n {\n \"attributeIdentifier\": \"6376\",\n \"attributeName\": \"Common.Contacts.RESELLER ADMIN EMAIL\",\n \"attributeValue\": \"reseller@reselleremail.com\"\n },\n {\n \"attributeIdentifier\": \"41319\",\n \"attributeName\": \"Site.Webex CMR.SERVICE ENABLED\",\n \"attributeValue\": \"false\"\n },\n {\n \"attributeIdentifier\": \"65958\",\n \"attributeName\": \"Site.Webex Core.TIME ZONE\",\n \"attributeValue\": \"(GMT -08:00) PACIFIC TIME,USA & CANADA\"\n },\n {\n \"attributeIdentifier\": \"65959\",\n \"attributeName\": \"Site.Webex Core.SERVICE URL\",\n \"attributeValue\": \"endcustomertest123.webex.com\"\n },\n {\n \"attributeIdentifier\": \"65612\",\n \"attributeName\": \"Site.Webex Core.COUNTRY CODE\",\n \"attributeValue\": \"US\"\n },\n {\n \"attributeIdentifier\": \"65960\",\n \"attributeName\": \"Site.Webex Core.PRIMARY LANGUAGE\",\n \"attributeValue\": \"en_US\"\n },\n {\n \"attributeIdentifier\": \"9217\",\n \"attributeName\": \"Common.Webex Common.ADMIN EMAIL\",\n \"attributeValue\": \"custadmin@customeremail.com\"\n },\n {\n \"attributeIdentifier\": \"66123\",\n \"attributeName\": \"Common.Webex Common.ADMIN LAST NAME\",\n \"attributeValue\": \"CustLName123\"\n },\n {\n \"attributeIdentifier\": \"9220\",\n \"attributeName\": \"Common.Webex Common.ADMIN FIRST NAME\",\n \"attributeValue\": \"CustFName123\"\n },\n {\n \"attributeIdentifier\": \"8451\",\n \"attributeName\": \"Common.Webex Common.ORGANIZATION NAME\",\n \"attributeValue\": \"CustomerOrginization123\"\n },\n {\n \"attributeIdentifier\": \"65769\",\n \"attributeName\": \"Common.Webex Common.ADMIN PHONE NUMBER\",\n \"attributeValue\": \"1231231234\"\n },\n {\n \"attributeIdentifier\": \"8952\",\n \"attributeName\": \"Site.Webex Conferencing.SERVICE ENABLED\",\n \"attributeValue\": \"TRUE\"\n },\n {\n \"attributeIdentifier\": \"9083\",\n \"attributeName\": \"Site.Webex Core.ADDITIONAL LANGUAGES\",\n \"attributeValue\": \"\"\n },\n {\n \"attributeIdentifier\": \"8821\",\n \"attributeName\": \"Site.Webex Brand.BRANDING REF\",\n \"attributeValue\": \"\"\n }\n ],\n \"offerDescription\": \"Cloud Calling and Business Messaging (1)\"\n }\n ],\n \"tncacceptance\": \"Y\"\n}")
.asString();
Change Subscription
HttpResponse<String> response = Unirest.put("https://apx.cisco.com/ccw/api/v1.0/subscription")
.header("content-type", "application/json")
.header("authorization", "Bearer oHRRke8kZ2CCYHskPGpEcwaREdEP")
.header("cache-control", "no-cache")
.body("{\n\t\"uuid\": \"test_order123123123123\",\n\t\"createdBy\": \"user_id\",\n\t\"createdDateTime\": \"2017-02-17T01:25:43.000+0000\",\n\t\"csbSubscriptionId\": \"csbSubtest123\",\n\t\"csbOrderId\": \"csbSubOrderTest123\",\n\t\"purchaseOrderNumber\": \"PO_80459464\",\n\t\"subscriptionId\": \"Sub1003363\",\n\t\"billingAddressId\": 403766138,\n\t\"currency\": \"USD\",\n\t\"paymentMethod\": \"NET30\",\n\t\"rejectDuplicatePO\": \"Y\",\n\t\"governmentOrder\": \"N\",\n\t\"intialTerm\": 48.0,\n\t\"autoRenewalTerm\": 12.0,\n\t\"billingModel\": \"Monthly Billing\",\n\t\"requestedStartDate\": \"2017-03-01\",\n\t\"offers\": [{\n\t\t\"lineNumber\": 1,\n\t\t\"offerSKU\": \"A-SPK-NU-M3\",\n\t\t\"quantity\": 1,\n\t\t\"csbCiscoKey\": \"2163146462363366067\",\n\t\t\"provisioningAttributes\": [{\n\t\t\t\"attributeIdentifier\": \"9331\",\n\t\t\t\"attributeName\": \"Common.Contacts.END CUSTOMER EMAIL\",\n\t\t\t\"attributeValue\": \"endcust@customeremail.com\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"8754\",\n\t\t\t\"attributeName\": \"Common.Contacts.PARTNER ADMIN EMAIL\",\n\t\t\t\"attributeValue\": \"partner@partneremail.com\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"6376\",\n\t\t\t\"attributeName\": \"Common.Contacts.RESELLER ADMIN EMAIL\",\n\t\t\t\"attributeValue\": \"reseller@reselleremail.com\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"41319\",\n\t\t\t\"attributeName\": \"Site.Webex CMR.SERVICE ENABLED\",\n\t\t\t\"attributeValue\": \"false\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"65958\",\n\t\t\t\"attributeName\": \"Site.Webex Core.TIME ZONE\",\n\t\t\t\"attributeValue\": \"(GMT -08:00) PACIFIC TIME,USA & CANADA\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"65959\",\n\t\t\t\"attributeName\": \"Site.Webex Core.SERVICE URL\",\n\t\t\t\"attributeValue\": \"endcustomertest12345.webex.com\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"65612\",\n\t\t\t\"attributeName\": \"Site.Webex Core.COUNTRY CODE\",\n\t\t\t\"attributeValue\": \"US\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"65960\",\n\t\t\t\"attributeName\": \"Site.Webex Core.PRIMARY LANGUAGE\",\n\t\t\t\"attributeValue\": \"en_US\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"9217\",\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN EMAIL\",\n\t\t\t\"attributeValue\": \"custadmin@customeremail.com\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"66123\",\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN LAST NAME\",\n\t\t\t\"attributeValue\": \"CustLName123\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"9220\",\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN FIRST NAME\",\n\t\t\t\"attributeValue\": \"CustFName123\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"8451\",\n\t\t\t\"attributeName\": \"Common.Webex Common.ORGANIZATION NAME\",\n\t\t\t\"attributeValue\": \"CustomerOrginization123\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"65769\",\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN PHONE NUMBER\",\n\t\t\t\"attributeValue\": \"1231231234\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"8952\",\n\t\t\t\"attributeName\": \"Site.Webex Conferencing.SERVICE ENABLED\",\n\t\t\t\"attributeValue\": \"TRUE\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"9083\",\n\t\t\t\"attributeName\": \"Site.Webex Core.ADDITIONAL LANGUAGES\",\n\t\t\t\"attributeValue\": \"\"\n\t\t}, {\n\t\t\t\"attributeIdentifier\": \"8821\",\n\t\t\t\"attributeName\": \"Site.Webex Brand.BRANDING REF\",\n\t\t\t\"attributeValue\": \"\"\n\t\t}],\n\t\t\"offerDescription\": \"Cloud Calling and Business Messaging (1)\"\n\t}],\n\t\"tncacceptance\": \"Y\"\n}")
.asString();
Cancel Subscription
HttpResponse<String> response = Unirest.post("https://apx.cisco.com/ccw/api/v1.0/subscription/cancel")
.header("authorization", "Bearer 3ucpq0Mk3BxF0EIzaaInAncqCxhE")
.header("content-type", "application/json")
.header("cache-control", "no-cache")
.body("{\r\n \"uuid\": \"testCancelSubscription_16FEB17_01\",\r\n \"createdBy\": \"user_id\",\r\n \"createdDateTime\": \"2017-02-16T18:25:43-05:00\",\r\n \"csbSubscriptionId\": \"Sub02162017-01\",\r\n \"csbOrderId\": \"Order02162017-01\",\r\n \"purchaseOrderNumber\": \"testCancelSubscription_16FEB17_01\",\r\n \"subscriptionId\": \"Sub1000618\",\r\n \"billingAddressId\": 403766138,\r\n \"cancelReason\": \"Adoption: Lack of Internal Support / Lost Sponsor\",\r\n \"cancelCode\": \"20~Adoption~Lack of Documentation\"\r\n}")
.asString();
Provisioning Validate
HttpResponse<String> response = Unirest.post("https://apx.cisco.com/ccw/api/v1.0/provisioning/validate")
.header("authorization", "Bearer pIJGFTSTXzLX1LgOHp3O0QotXWkE")
.header("content-type", "application/json")
.header("cache-control", "no-cache")
.body("{\r\n\t\"uuid\": \"test_order123123123123\",\r\n\t\"createdBy\": \"user_id\",\r\n\t\"createdDateTime\": \"2017-02-17T01:25:43.000+0000\",\r\n\t\"csbSubscriptionId\": \"csbSubtest123\",\r\n\t\"csbOrderId\": \"csbSubOrderTest123\",\r\n\t\"purchaseOrderNumber\": \"PO123456\",\r\n\t\"billingAddressId\": 123123,\r\n\t\"billingAddressName\": \"Billing_Party_Name_Here\", \r\n\t\"currency\": \"USD\",\r\n\t\"paymentMethod\": \"NET30\",\r\n\t\"rejectDuplicatePO\": \"Y\",\r\n\t\"governmentOrder\": \"N\",\r\n\t\"intialTerm\": 12.0,\r\n\t\"autoRenewalTerm\": 12.0,\r\n\t\"billingModel\": \"Monthly Billing\",\r\n\t\"requestedStartDate\": \"2017-03-01\",\r\n\t\"parties\": [{\r\n\t\t\"partyType\": \"End Customer\",\r\n\t\t\"partyName\": \"Customer_Name\",\r\n\t\t\"addressLine1\": \"Customer_Address\",\r\n\t\t\"city\": \"Customer_Address_City\",\r\n\t\t\"state\": \"Customer_Address_State\",\r\n\t\t\"postalCode\": \"94043\",\r\n\t\t\"country\": \"US\",\r\n\t\t\"businessContactName\": \"First Last\",\r\n\t\t\"businessContactEmail\": \"firstlast@customeremail.com\",\r\n\t\t\"businessContactTelephone\": \"444-555-6666\"\r\n\t}, {\r\n\t\t\"partyType\": \"Reseller\",\r\n\t\t\"partyName\": \"Reseller Name\",\r\n\t\t\"accountNumber\": \"21472846\",\r\n\t\t\"addressLine1\": \"Reseller_Address\",\r\n\t\t\"city\": \"Reseller_Address_City\",\r\n\t\t\"state\": \"Reseller_Address_State\",\r\n\t\t\"postalCode\": \"70507\",\r\n\t\t\"country\": \"US\",\r\n\t\t\"businessContactName\": \"First Last\",\r\n\t\t\"businessContactEmail\": \"firstlast@customeremail.com\",\r\n\t\t\"businessContactTelephone\": \"111-222-3344\"\r\n\t}],\r\n\t\"offers\": [{\r\n\t\t\"lineNumber\": 1,\r\n\t\t\"offerSKU\": \"A-SPK-NU-M3\",\r\n\t\t\"quantity\": 1,\r\n\t\t\"csbCiscoKey\": \"2163146462363366067\",\r\n\t\t\"provisioningAttributes\": [{\r\n\t\t\t\"attributeIdentifier\": \"9331\",\r\n\t\t\t\"attributeName\": \"Common.Contacts.END CUSTOMER EMAIL\",\r\n\t\t\t\"attributeValue\": \"endcust@customeremail.com\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"8754\",\r\n\t\t\t\"attributeName\": \"Common.Contacts.PARTNER ADMIN EMAIL\",\r\n\t\t\t\"attributeValue\": \"partner@partneremail.com\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"6376\",\r\n\t\t\t\"attributeName\": \"Common.Contacts.RESELLER ADMIN EMAIL\",\r\n\t\t\t\"attributeValue\": \"reseller@reselleremail.com\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"41319\",\r\n\t\t\t\"attributeName\": \"Site.Webex CMR.SERVICE ENABLED\",\r\n\t\t\t\"attributeValue\": \"false\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"65958\",\r\n\t\t\t\"attributeName\": \"Site.Webex Core.TIME ZONE\",\r\n\t\t\t\"attributeValue\": \"(GMT -08:00) PACIFIC TIME,USA & CANADA\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"65959\",\r\n\t\t\t\"attributeName\": \"Site.Webex Core.SERVICE URL\",\r\n\t\t\t\"attributeValue\": \"endcustomertest123.webex.com\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"65612\",\r\n\t\t\t\"attributeName\": \"Site.Webex Core.COUNTRY CODE\",\r\n\t\t\t\"attributeValue\": \"US\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"65960\",\r\n\t\t\t\"attributeName\": \"Site.Webex Core.PRIMARY LANGUAGE\",\r\n\t\t\t\"attributeValue\": \"en_US\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"9217\",\r\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN EMAIL\",\r\n\t\t\t\"attributeValue\": \"custadmin@customeremail.com\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"66123\",\r\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN LAST NAME\",\r\n\t\t\t\"attributeValue\": \"CustLName123\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"9220\",\r\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN FIRST NAME\",\r\n\t\t\t\"attributeValue\": \"CustFName123\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"8451\",\r\n\t\t\t\"attributeName\": \"Common.Webex Common.ORGANIZATION NAME\",\r\n\t\t\t\"attributeValue\": \"CustomerOrginization123\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"65769\",\r\n\t\t\t\"attributeName\": \"Common.Webex Common.ADMIN PHONE NUMBER\",\r\n\t\t\t\"attributeValue\": \"1231231234\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"8952\",\r\n\t\t\t\"attributeName\": \"Site.Webex Conferencing.SERVICE ENABLED\",\r\n\t\t\t\"attributeValue\": \"TRUE\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"9083\",\r\n\t\t\t\"attributeName\": \"Site.Webex Core.ADDITIONAL LANGUAGES\",\r\n\t\t\t\"attributeValue\": \"\"\r\n\t\t}, {\r\n\t\t\t\"attributeIdentifier\": \"8821\",\r\n\t\t\t\"attributeName\": \"Site.Webex Brand.BRANDING REF\",\r\n\t\t\t\"attributeValue\": \"\"\r\n\t\t}],\r\n\t\t\"offerDescription\": \"Cloud Calling and Business Messaging (1)\"\r\n\t}],\r\n\t\"tncacceptance\": \"Y\"\r\n}")
.asString();
Get Status
HttpResponse<String> response = Unirest.get("https://apx.cisco.com/ccw/api/v1.0/subscription/status?csbSubscriptionId=csbSubtest123")
.header("authorization", "Bearer oHRRke8kZ2CCYHskPGpEcwaREdEP")
.header("content-type", "application/json")
.header("cache-control", "no-cache")
.asString();